package com.itzhoun.strategy.context;

/**
 * @author 周楠
 * @Date 2022/11/30/下午 9:34
 */
public class CashRebate extends CashStrategy{

    //第二种模式 打折扣
    private double moneyRebate = 0;

    public CashRebate(double moneyRebate) {
        this.moneyRebate = moneyRebate;
    }

    @Override
    public double acceptMoney(double money) {
        return money * moneyRebate;
    }
}
